package com.xinyan.plc;

import com.github.xingshuangs.iot.common.enums.EDataType;
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Variable;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@NoArgsConstructor
@Data
public class HandAutoParam implements Serializable {

    /**
     * 手动模式
     */
    @S7Variable(address = "m3.2", type = EDataType.BOOL)
    private boolean m32;

    /**
     * 自动模式
     */
    @S7Variable(address = "m3.3", type = EDataType.BOOL)
    private boolean m33;
    /**
     * 自动运行计时
     */
    @S7Variable(address = "m3.4", type = EDataType.BOOL)
    private boolean m34;
    /**
     * 自动停止计时
     */
    @S7Variable(address = "m3.5", type = EDataType.BOOL)
    private boolean m35;
    /**
     * 当前是否循环
     */
    @S7Variable(address = "m3.6", type = EDataType.BOOL)
    private boolean m36;
    /**
     * 循环启动标记
     */
    @S7Variable(address = "m3.7", type = EDataType.BOOL)
    private boolean m37;
    /**
     * 循环停止标记
     */
    @S7Variable(address = "m4.0", type = EDataType.BOOL)
    private boolean m40;
    /**
     * 电机启动停止数据：1-停止 18（2#10010）-停止
     */
    @S7Variable(address = "vw100", type = EDataType.UINT16)
    private int vw100;

    public HandAutoParam(int vw100){
        this.m34 = false;
        this.m35 = false;
        this.m36 = false;
        this.m37 = false;
        this.m40 = false;
        this.vw100 = vw100;
    }


}
